@extends('layout')
@section('opciones')

    <a class="btn list-group-item" href="{{URL::to('ganado')}}"><i class="fa fa-star fa-lg"></i>&nbsp; Ganado</a>
  <a class="btn list-group-item" href="{{URL::to('ganado/create')}}"><i class="fa fa-plus-square fa-lg"></i>&nbsp; Agregar</a>
  <a class="btn list-group-item" href="{{URL::to('ganadovendido')}}"><i class="fa fa-usd fa-lg"></i>&nbsp; Vendidos</a>
  <a class="btn list-group-item" href="{{URL::to('ganadolesionado')}}"><i class="fa fa-ambulance fa-lg"></i>&nbsp; Lesionados</a>
  <a class="btn list-group-item" href="{{URL::to('ganadoinactivo')}}"><i class="fa fa-cog fa-fw"></i>&nbsp; Inactivos</a>
   <a class="btn list-group-item" href="{{URL::to('ganadomuerto')}}"><i class="fa fa-thumbs-down fa-fw"></i>&nbsp; Muerto</a>
@stop
@section('content')
<div class="bloque row color1">
  <center><h5>GANADOS</h5></center>
</div>
<div class="bloque">
    <div class="table-responsive">
      <table class="table table-striped">
    	<tr>
    		<th>Cod-Ganado</th>
    		<th>Sexo</th>
    		<th>Color</th>
    		<th>Raza</th>
    		<th>Tipo</th>
    		<th>Nacimiento</th>
    		<th>Cod-Madre</th>
    		<th>Cod-padre</th>
            <th>Opciones</th>
    	</tr>
    	@foreach($ganados as $ganado)
    		<tr>
    			
    			<td>{{$ganado -> cod_ganado}}</td>
    			<td>{{$ganado -> sexo}} 
                </td>
    			<td>{{$ganado -> color}}</td>
    			<td>{{$ganado->id_raza}}</td>
    			<td>{{$ganado ->id_tipo}}</td>
    			<td>{{$ganado -> fecha_nacimiento}}</td>
    			<td>{{$ganado -> cod_madre}}</td>
    			<td>{{$ganado -> cod_padre}}</td>
    			<td>
 {{Form::model($ganado,array('url' =>'ganado/'.$ganado->id,'method' => 'delete'),array('role'=>'form'))}}
                    <button type="button" class="btn btn-info btn-xs" data-toggle="modal" data-target="#myModal" href="{{route('ganado.show',$ganado->id)}}">Ver</button>
    				<a href="{{route('ganado.edit',$ganado->id)}}" class="btn btn-warning btn-xs">Editar</a>
                   
                    {{Form::button('Eliminar', array('type' => 'submit', 'class' => 'btn btn-danger btn-xs'))}}
                    {{Form::close()}}
                  
    			</td>
    		</tr>
    	@endforeach
    </table>
    
  </div>
</div>
  {{$ganados->links()}}
@stop

@section('modal')
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      

    </div>
  </div>
</div>
@stop
